package cn.webrx;

import java.util.Scanner;

public class Type3 {
    public static void main(String[] args) {
        //实例化Scanner类，主要功能是用于输入数字
        Scanner sc = new Scanner(System.in);
        while (true) {
            System.out.print("请输入数字a");
            int a = sc.nextInt();
            if (a == 0) {
                System.out.println("退出求和，");
                break;
            }
            System.out.println();
            System.out.print("请输入数字b");
            int b = sc.nextInt();
            if (b == 0) {
                break;
            }
            System.out.printf("%d - %d = %d", a, b, a - b);
            System.out.println();
        }
    }
}
